package com.cnsoft.persistent.player2.U104060QuesVal;

import org.cnsoft.framework.db.manager.MyDBTableSQLSupport;
import org.springframework.stereotype.Component;

/**
 * 问卷填写表建表语句
 */
@Component("U104060QuesValSQL")
//@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class U104060QuesValSQL extends MyDBTableSQLSupport {
	// 表名
	public String getTableName() {
		return "u104060_ques_val";
	}

	// 获得SQL内容
	public String getSQL() throws Exception {
		StringBuilder sqlStringBuilder = new StringBuilder();// 临时变量

		sqlStringBuilder.append("CREATE TABLE u104060_ques_val");
		sqlStringBuilder.append("(");
		sqlStringBuilder.append("    id VARCHAR(64) NOT NULL COMMENT '流水ID',");
		sqlStringBuilder.append("    ques_id VARCHAR(40) NOT NULL COMMENT '问卷ID',");
		sqlStringBuilder.append("    ques_name VARCHAR(120) COMMENT '问卷名称',");
		sqlStringBuilder.append("    start_day VARCHAR(24) NOT NULL COMMENT '填写日期',");
		sqlStringBuilder.append("    start_time VARCHAR(24) NOT NULL COMMENT '填写时间',");
		sqlStringBuilder.append("    ques_detail TEXT COMMENT '问卷填写详情',");
		sqlStringBuilder.append("    user_id VARCHAR(64) NOT NULL COMMENT '申请人ID',");
		sqlStringBuilder.append("    user_name VARCHAR(80) COMMENT '申请人姓名',");
		sqlStringBuilder.append("    user_phone VARCHAR(40) COMMENT '申请人手机号',");
		sqlStringBuilder.append("    user_province VARCHAR(64) COMMENT '会员省',");
		sqlStringBuilder.append("    user_city VARCHAR(64) COMMENT '会员市',");
		sqlStringBuilder.append("    user_area VARCHAR(64) COMMENT '会员区',");
		sqlStringBuilder.append("    user_adress VARCHAR(200) COMMENT '会员地址',");
		sqlStringBuilder.append("    process_name VARCHAR(80) COMMENT '业务实现类名',");
		sqlStringBuilder.append("    work_order_id VARCHAR(64) COMMENT '工单ID',");
		sqlStringBuilder.append("    work_order_state_code VARCHAR(4) DEFAULT '1' COMMENT '工单状态编码',");
		sqlStringBuilder.append("    work_order_state_name VARCHAR(20) DEFAULT '1' COMMENT '工单状态说明',");
		sqlStringBuilder.append("    meno VARCHAR(200) COMMENT '备注',");
		sqlStringBuilder.append("    fb1 VARCHAR(40) COMMENT '备用1',");
		sqlStringBuilder.append("    fb2 VARCHAR(20) COMMENT '备用2',");
		sqlStringBuilder.append("    fb3 VARCHAR(50) COMMENT '备用3',");
		sqlStringBuilder.append("    fb4 VARCHAR(200) COMMENT '备用4',");
		sqlStringBuilder.append("    fb5 VARCHAR(80) COMMENT '备用5',");
		sqlStringBuilder.append("    eb1 VARCHAR(40) COMMENT '扩展1',");
		sqlStringBuilder.append("    eb2 VARCHAR(80) COMMENT '扩展2',");
		sqlStringBuilder.append("    eb3 VARCHAR(20) COMMENT '扩展3',");
		sqlStringBuilder.append("    eb4 VARCHAR(10) COMMENT '扩展4',");
		sqlStringBuilder.append("    eb5 VARCHAR(20) COMMENT '扩展5',");
		sqlStringBuilder.append("    hdp VARCHAR(20) COMMENT '数据归属系统',");
		sqlStringBuilder.append("    del_flag CHAR(1) DEFAULT '0' COMMENT '有效标识',");
		sqlStringBuilder.append("    create_time VARCHAR(24) DEFAULT '2018-02-02' NOT NULL COMMENT '创建时间',");
		sqlStringBuilder.append("    creator VARCHAR(64) DEFAULT 'SYSTEM' NOT NULL COMMENT '创建者',");
		sqlStringBuilder.append("    update_time VARCHAR(24) COMMENT '更新时间',");
		sqlStringBuilder.append("    updator VARCHAR(64) COMMENT '最后更新者',");
		sqlStringBuilder.append("  PRIMARY KEY (id)");
		sqlStringBuilder.append(") COMMENT '问卷填写表';");

		return sqlStringBuilder.toString();
	}

}
